<template>
  <div id="reorder">  

      <el-form ref="form"  label-width="80px">           
          <el-row>
            <el-col :span="24" >  
                <el-page-header @back="goBack"   :content='this.$route.query.name'  style="margin-bottom:10px;"></el-page-header>
            </el-col>
          </el-row>
          
    </el-form>

   <!-- 渲染数据list -->
   <re-order-list :datalist="datalist" @up_list_fun="list_fun"> </re-order-list>

      
   <div style="margin-top:20px;text-align: center;">
      <el-pagination
        background
        @current-change="handleCurrentChange"
        :page-size="10"  
        layout="prev, pager, next, jumper"
        :total="count">
      </el-pagination>
    </div>

      
     
  </div>
</template>

<script>
import ReOrderList from '@/view/Exchangeorder/ReOrderList'
export default {
  name: 'reorder',
  data () {
    return {
        datalist:[],
        page:1,
        count:0,
        my_uid:'',
        form:{
          telphone:'',
          select_num:'',
        },

    }
  },
 components:{
    ReOrderList
  },
  created(){
      this.my_uid = this.$route.query.id
      this.form.telphone = this.$route.query.name
      this.list_fun()
  },
  mounted (){
    
  },
  methods: {
      list_fun(){
          this.post("/rogue/listOfData", {
              page:this.page,
              uid:this.my_uid,
	        }).then(res => {
            this.count = res.result.count
            this.datalist = res.result.list
            console.log(res)
         })
      },
      goBack() {
        this.$router.go(-1)
     },
     handleSizeChange(val) {
        console.log(`每页 ${val} 条`);
      },
      handleCurrentChange(val) {
        this.page = val
        this.list_fun()
        console.log(`当前页: ${val}`);
      },
  }
}
</script>


<style scoped>
</style>
